package com.ijunfu.spring.genBean._12_smart_factory_bean.factoryBean;

import com.ijunfu.spring.genBean._12_smart_factory_bean.utils.Helper;
import org.springframework.beans.factory.SmartFactoryBean;
import org.springframework.stereotype.Component;

/**
 *
 * @Title  : 
 * @Author : ijunfu <ijunfu@163.com>
 * @Date   : 2023/11/10 15:24
 * @Version: 1.0
 * @Motto  : 世界很大 世界很小
 *
 */
@Component
public class HelperFactoryBean implements SmartFactoryBean {
    @Override
    public Object getObject() throws Exception {
        return new Helper();
    }

    @Override
    public Class<?> getObjectType() {
        return Helper.class;
    }

    @Override
    public boolean isEagerInit() {  // 决定Bean生成的时机
        return true;
    }
}
